package jp.sourceforge.akjrcp.akj_betas.wizards;

import java.io.File;

import jp.sourceforge.akjrcp.ui.EditableFileList;

import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PlatformUI;

public class FileListWizardPage extends WizardPage{

	private EditableFileList list;


	protected FileListWizardPage(String pageName) {
		super(pageName);
		// TODO Auto-generated constructor stub
		//setPageComplete(false);
		//setDescription("never_japanese");
	}
	
	public File[] getFileList() {
		return list.getFileList();
	}
	

	public void createControl(Composite parent) {
	
		list = new EditableFileList(parent,SWT.NULL);
		list.setFilenameFilter(new MPEG1FileNameFilter());
		IWorkbenchPart part=PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart();
		
		list.setInput(part.getSite());
		
		//list.setInput(getViewSite());
		GridData data=new GridData(GridData.FILL_BOTH);
		list.getControl().setLayoutData(data);
		setControl(list.getControl());
	}

	
}
